﻿
using System;
using System.IO;

namespace MX.Core.Caching.Redis.Sider
{
 

	// TODO: Provide a way to safely configure ISerializer<T>
	//  (one should be selected on init, should not be settable while piplining etc.)
	public partial class SiderRedisClient  : RedisClientBase, IRedisClient
	{
		 



		// serialization stuff helper delegate
		private readonly Func<ProtocolReader, Stream,byte[]> _readObj;
		private readonly Func<ProtocolReader, Stream,byte[][]> _readObjs;

 
		public Mode Mode { get { return Executor.Mode; } }

		 
		public SiderRedisClient ()
		{

			_readObj = (r, s) => r.ReadSerializedBulk (s);
			_readObjs = (r, s) => r.ReadSerializedMultiBulk (s);
		}
		 
	}
}
